package com.jk.dmloginprovider.controller;

import  com.jk.dmcommon.LybEntity.UserEntity;
import com.jk.dmloginprovider.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.net.Socket;

@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;


    /**
     * @description:  前台用户请求登录大麦网
     * @param: [user]
     * @return: java.lang.String
     * @author 刘杨彬
     * @date: 2021/9/7 19:29
     */
    @RequestMapping("frontDeskLogin")
    public String frontDeskLogin(@RequestBody UserEntity userEntity,HttpServletRequest request){
        return userService.frontDeskLogin(userEntity,request);
    }

    /**
     * @description:  用户注册
     * @param: [user, request]
     * @return: java.lang.Object
     * @author 刘杨彬
     * @date: 2021/9/7 19:29
     */
    @RequestMapping("login1")
    public Object login1(@RequestBody UserEntity user, HttpServletRequest request){

        return userService.login1(user,request);
    }

    
}
